import 'package:animal/constant/font.dart';
import 'package:animal/item/mine_option_item.dart';
import 'package:animal/ui/mine/controller/mine_wallet_controller.dart';
import 'package:animal/utils/screen_util.dart';
import 'package:animal/widgets/appbar_widget.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getwidget/getwidget.dart';

///我的钱包
class MineWalletPage extends StatelessWidget {
  const MineWalletPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final controller = Get.put(MineWalletController());
    return Scaffold(
      backgroundColor: Colors.blue,
      appBar: AppBarWidget.defaultAppBar(
          title: const Text("我的钱包"),
          elevation: 0,
          titleTextStyle: KFontConstant.myTextStyle(color: Colors.white, size: 18, bold: true),
          backColor: Colors.white),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            height: ScreenUtil().L(20),
          ),
          Text("账号余额（元）", style: KFontConstant.myTextStyle(size: 18, color: Colors.white)),
          Container(
            height: ScreenUtil().L(15),
          ),
          Text("1388.99", style: KFontConstant.myTextStyle(size: 25, color: Colors.white, bold: true)),
          Container(
            height: ScreenUtil().L(25),
          ),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              GFButton(
                onPressed: () => controller.gotoRecharge(),
                text: "立即充值",
                textStyle: KFontConstant.myTextStyle(size: 18, color: Colors.white),
                type: GFButtonType.transparent,
              ),
              Container(
                width: ScreenUtil().L(2),
                height: ScreenUtil().L(20),
                color: Colors.white,
              ),
              GFButton(
                onPressed: () {},
                text: "立即提现",
                textStyle: KFontConstant.myTextStyle(size: 18, color: Colors.white),
                type: GFButtonType.transparent,
              ),
            ],
          ),
          Container(
            height: ScreenUtil().L(30),
          ),
          Expanded(
            child: Container(
              width: double.infinity,
              padding: EdgeInsets.only(top: ScreenUtil().L(35)),
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.vertical(top: Radius.circular(ScreenUtil().L(40))),
              ),
              child: Column(
                children: [
                  MineOptionItem(
                    name: "123",
                    onTap: () {},
                  ),
                  MineOptionItem(
                    name: "123",
                    onTap: () {},
                  ),
                  MineOptionItem(
                    name: "123",
                    onTap: () {},
                  ),
                  MineOptionItem(
                    name: "123",
                    onTap: () {},
                  ),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
